//
//  HerView.m
//  ReactiveObjCDemo
//
//  Created by Xwoder on 2017/9/15.
//  Copyright © 2017年 Xwoder. All rights reserved.
//

#import "HerView.h"

@interface HerView ()

@property (nonatomic, strong) UIButton *button;

@end

@implementation HerView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor redColor];
        UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewTaped:)];
        [self addGestureRecognizer:tapGestureRecognizer];
    }
    return self;
}

- (void)viewTaped:(UITapGestureRecognizer *)tapGestureRecognizer {
    !self.delegate ? : [self.delegate herViewTaped:self];
}

@end
